<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="web" uri="http://meerkat.qunar.com/web"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<web:designCss/>
<title>获取当前账号信息</title>
<%@include file="/WEB-INF/include/head.jsp" %>
</head>
<body>
    <div class="wrapper">
        <web:titleBar title="账户信息" />

        <div class="main content">
    <table>
        <tr>
            <td>ID</td>
            <td><input type="text" id="id" name="id" value="${user.id}" disabled="disabled"/></td>
        </tr>
        <tr>
            <td>用户名</td>
            <td><input type="text" id="name" name="name" value="${user.name}" disabled="disabled"/></td>
        </tr>
        <tr>
            <td>真实姓名</td>
            <td><input type="text" id="realname" name="realname" value="${user.realname}" disabled="disabled" /></td>
        </tr>
        <tr>
            <td>所属部门</td>
            <td><input type="text" id="department" name="department" value="${user.department}" disabled="disabled"/></td>
        </tr>
        <tr>
            <td>邮箱</td>
            <td><input type="text" id="email" name="email" value="${user.email}" /></td>
        </tr>
        <tr>
            <td>账号类型</td>
            <td>
                <c:if test="${user.authType==0}">
                    <input type="radio" name="authType" value="0" checked/>SSO用户
                    <input type="radio" name="authType" value="1" />密码用户
                </c:if>
                <c:if test="${user.authType==1}">
                    <input type="radio" name="authType" value="0" />SSO用户
                    <input type="radio" name="authType" value="1" checked/>密码用户
                </c:if>
            </td>
        </tr>
        <tr>
            <td>用户组</td>
            <td>
                <select class="sel_mult" name="gid" id="gid" multiple="true">
                    <c:forEach items="${groupList}" var="group">
                        <option id="group_option_${group.id}" value="${group.id}">${group.name}</option>
                    </c:forEach>
                </select>
                <script>
                    <c:forEach items="${bindGroupList}" var="bindGroupId">
                        document.getElementById("group_option_${bindGroupId}").selected = true;
                    </c:forEach>
                </script>
            </td>
        </tr>
    </table>
    </div>
</div>
</body>
</html>
